home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: bath.ac.uk!uwe-bristol!pa-ross
- From: pa-ross@uwe.ac.uk (P Ross)
- Subject: Linking external Stuff with Watcom c++
- Message-ID: <1996Feb17.103251.19696@pat.uwe.ac.uk>
- Sender: usenet@pat.uwe.ac.uk (uwe nntp usenet poster)
- Nntp-Posting-Host: usenet@pat.uwe.ac.uk (uwe nntp usenet poster)
- Organization: University of the West of England, Bristol
- X-Newsreader: Tin 1.1 PL5
- Date: Sat, 17 Feb 1996 10:32:51 GMT
-
- Hi folks,
-
- Does anyone know how to get external C to link into watcom c++ code ? (BTW the
- external C is watcom also)
-
- A basic example, I have two files, main.cpp & bitmap.cpp
-
- bitmap.cpp looks like
-
- extern "C" {
- uchar map[]=
- {
- 0,1,2,3,4,5,6,7
- }
- }
-
- main.cpp looks like,
-
- extern map;
- void main(void)
- {
- cout<<"The address of the bitmap is "<<map<<endl;
- }
-
- I can get it to compile but I keep getting the address as a NULL pointer :(
-
- Can anyone help ?
-
- Thanks,
-
- Paul
-
-
-